package cn.com.niit.online.music.controller;
import cn.com.niit.online.music.service;

@RestController
public class CommentController {
    @Autowired
    private CommentService commentService;
    //根据歌单id获取评论列表
    @GetMapping("/comment/songList/{songListId}")
    public R commentListOfSongListId(@PathVariable("songListId") Integer songListId) {
        List<CommentResponsePO> commentList = new ArrayList<>();
        CommentResponsePO po = new CommentResponsePO();
        po.setId(3);
        po.setUp(1);
        po.setUserId(1);
        po.setUserName("Yin33");
        po.setSongListId(songListId);
        po.setUp(1);
        commentList.add(po);
        //TODO 需要调用 Service 进行实现
        return R.success("查询成功", commentList);
    }

    //根据歌单id获取评论列表
    @GetMapping("/comment/songList/{songListId}")
    public R commentListOfSongListId(@PathVariable("songListId") Integer songListId) {
        return commentService.getCommentListBySongListId(songListId);
    }
}



